package br.com.lopes.gci.controller.Validation;

import javax.faces.component.html.HtmlInputSecret;
import javax.faces.component.html.HtmlInputText;

import br.com.lopes.gci.util.MessageUtil;

public class LoginValidation extends Validator{
	
	private HtmlInputText loginInput;
	private HtmlInputSecret senhaInput;
	
	public boolean validateInputs(){
		if(!validateInput(loginInput, MessageUtil.getInstance().getDefaultMessageFromBundle("error.campoobrigatorio"))){
			return false;
		}
		if(!validateInputSecret(senhaInput, MessageUtil.getInstance().getDefaultMessageFromBundle("error.campoobrigatorio"))){
			return false;
		}
		return true;
	}
	
	public HtmlInputText getLoginInput() {
		return loginInput;
	}


	public HtmlInputSecret getSenhaInput() {
		return senhaInput;
	}


	public void setSenhaInput(HtmlInputSecret senhaInput) {
		this.senhaInput = senhaInput;
	}


	public void setLoginInput(HtmlInputText loginInput) {
		this.loginInput = loginInput;
	}
	public boolean validate(){
		return true;
	}
	
}
